3.3.87 \(\int \cos (e+f x) (b \csc (e+f x))^n \, dx\) [287]

Optimal. Leaf size=24 \[ \frac {b (b \csc (e+f x))^{-1+n}}{f (1-n)} \]

[Out]

b*(b*csc(f*x+e))^(-1+n)/f/(1-n)

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 24, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {2701, 30} \begin {gather*} \frac {b (b \csc (e+f x))^{n-1}}{f (1-n)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cos[e + f*x]*(b*Csc[e + f*x])^n,x]

[Out]

(b*(b*Csc[e + f*x])^(-1 + n))/(f*(1 - n))

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2701

Int[(csc[(e_.) + (f_.)*(x_)]*(a_.))^(m_)*sec[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> Dist[-(f*a^n)^(-1), Subst
[Int[x^(m + n - 1)/(-1 + x^2/a^2)^((n + 1)/2), x], x, a*Csc[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && Integer
Q[(n + 1)/2] &&  !(IntegerQ[(m + 1)/2] && LtQ[0, m, n])

Rubi steps

\begin {align*} \int \cos (e+f x) (b \csc (e+f x))^n \, dx &=-\frac {b \text {Subst}\left (\int x^{-2+n} \, dx,x,b \csc (e+f x)\right )}{f}\\ &=\frac {b (b \csc (e+f x))^{-1+n}}{f (1-n)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.03, size = 23, normalized size = 0.96 \begin {gather*} -\frac {b (b \csc (e+f x))^{-1+n}}{f (-1+n)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cos[e + f*x]*(b*Csc[e + f*x])^n,x]

[Out]

-((b*(b*Csc[e + f*x])^(-1 + n))/(f*(-1 + n)))

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(65\) vs. \(2(24)=48\).
time = 2.55, size = 66, normalized size = 2.75

method result size
norman \(-\frac {2 \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) {\mathrm e}^{n \ln \left (\frac {b \left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}\right )}}{f \left (-1+n \right ) \left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}\) \(66\)
risch \(\text {Expression too large to display}\) \(1312\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(f*x+e)*(b*csc(f*x+e))^n,x,method=_RETURNVERBOSE)

[Out]

-2/f/(-1+n)*tan(1/2*f*x+1/2*e)*exp(n*ln(1/2*b*(1+tan(1/2*f*x+1/2*e)^2)/tan(1/2*f*x+1/2*e)))/(1+tan(1/2*f*x+1/2
*e)^2)

________________________________________________________________________________________

Maxima [A]
time = 0.29, size = 31, normalized size = 1.29 \begin {gather*} -\frac {b^{n} \sin \left (f x + e\right )^{-n} \sin \left (f x + e\right )}{f {\left (n - 1\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)*(b*csc(f*x+e))^n,x, algorithm="maxima")

[Out]

-b^n*sin(f*x + e)^(-n)*sin(f*x + e)/(f*(n - 1))

________________________________________________________________________________________

Fricas [A]
time = 3.27, size = 31, normalized size = 1.29 \begin {gather*} -\frac {\left (\frac {b}{\sin \left (f x + e\right )}\right )^{n} \sin \left (f x + e\right )}{f n - f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)*(b*csc(f*x+e))^n,x, algorithm="fricas")

[Out]

-(b/sin(f*x + e))^n*sin(f*x + e)/(f*n - f)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (b \csc {\left (e + f x \right )}\right )^{n} \cos {\left (e + f x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)*(b*csc(f*x+e))**n,x)

[Out]

Integral((b*csc(e + f*x))**n*cos(e + f*x), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)*(b*csc(f*x+e))^n,x, algorithm="giac")

[Out]

integrate((b*csc(f*x + e))^n*cos(f*x + e), x)

________________________________________________________________________________________

Mupad [B]
time = 0.32, size = 28, normalized size = 1.17 \begin {gather*} -\frac {\sin \left (e+f\,x\right )\,{\left (\frac {b}{\sin \left (e+f\,x\right )}\right )}^n}{f\,\left (n-1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(e + f*x)*(b/sin(e + f*x))^n,x)

[Out]

-(sin(e + f*x)*(b/sin(e + f*x))^n)/(f*(n - 1))

________________________________________________________________________________________